import request from '@/utils/request'

// 获取商品列表
export function goodsList(name) {
  return request({
    url: '/goods/goods_list',
    method: 'get',
    params: { name }
  })
}

// 删除商品
export function delGoods(id) {
  return request({
    url: '/goods/goods',
    method: 'delete',
    params: { id }
  })
}

// 新增商品
export function addGoods(data) {
  return request({
    url: '/goods/goods',
    method: 'post',
    data
  })
}
